<?
if(!$CFG) require_once('config.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Page for GownFull</title>
<script type="text/javascript">
//<![CDATA[
function turnon_designmode()
{
	var f = document.getElementById('if');
	var fwin = f.contentWindow;

	fwin.document.designMode = 'on';
}
function get_HTML()
{
	var f = document.getElementById('if');
	var fwin = f.contentWindow;
	var ta = document.getElementById('ta');

	ta.value = fwin.document.body.innerHTML;
}
function set_HTML()
{
	var f = document.getElementById('if');
	var fwin = f.contentWindow;
	var ta = document.getElementById('ta');

	fwin.document.body.innerHTML = ta.value;
}
//]]>
</script>
</head>
<body>
<h1>Test Page for GownFull</h1>
<a href="javascript:(function(){if(window.GownFull&&window.GownFull.instance){window.GownFull.instance.ToggleIME(true);}else{node=document.createElement('script');node.type='text/javascript';node.src='<?=$CFG->GownFull_URL?>include_gownfull.php?lang=zh_TW';document.body.appendChild(node);}})();">Start GownFull</a>

<a href="javascript:(function(){if(window.GownFull&&window.GownFull.instance){window.GownFull.instance.ToggleIME(true);}else{node=document.createElement('script');node.type='text/javascript';node.src='<?=$CFG->GownFull_URL?>include_gownfull.php?lang=zh_TW&debug=1';document.body.appendChild(node);}})();">Start GownFull (Debug version)</a>
<p>
This is INPUT text <br />
<input type="text" />
</p>
<p>
This is TEXTAREA <br />
<textarea id="ta" cols="60" rows="5"></textarea>
</p>
<p>
This is RichEdit (IFRAME with designMode = 'on') <br />
<iframe id="if" src="blank.html" width="600" height="300"></iframe>
<button onclick="get_HTML();">Get HTML</button>
<button onclick="set_HTML();">Set HTML</button>
</p>
<script type="text/javascript">
//<![CDATA[
setTimeout(turnon_designmode,500);
//]]>
</script>
</body>
</html>
